#include <motor.h>
#include <Arduino.h>

Motor::Motor(uint8_t PWM_pin)
{
    this->pwm_pin = PWM_pin;
};
void Motor::set_speed(int16_t speed)
{
    this->is_clockwise = speed >= 0;
    this->uspeed = abs(speed);
    analogWrite(this->pwm_pin, this->uspeed);
}
